package com.hwrt.hellomaven.controller;


import com.hwrt.hellomaven.common.UserCache;
import com.hwrt.hellomaven.dao.IUserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by Administrator on 2019/6/25.
 */
@Controller
public class MyController {

    @Autowired
    private IUserDao userDao;

    @Autowired
    private UserCache userCache;

   @RequestMapping("/haha")
   @ResponseBody
    public String hello(){
       System.out.println("MyController.hello");

       String hahakey = userCache.getOneBean(String.class, "hahakey");
       System.out.println("hahakey = " + hahakey);


       return "/success.jsp";
    }
}
